﻿using Basic.FormGatewaryModular.Interface;
using Basic.FormRemoteModel.QueryGroup;
using Basic.FormRemoteModel.QueryGroup.Model;

namespace Basic.FormGatewaryModular.Services
{
    internal class PhyQueryGroupService : IPhyQueryGroupService
    {
        public long Add ( QueryGroupAdd data )
        {
            return new AddPhyQueryGroup
            {
                Datum = data
            }.Send();
        }

        public void Delete ( long id )
        {
            new DeletePhyQueryGroup
            {
                Id = id
            }.Send();
        }

        public QueryGroupDto Get ( long id )
        {
            return new GetPhyQueryGroup
            {
                Id = id
            }.Send();
        }

        public bool Set ( long id, QueryGroupSet set )
        {
            return new SetPhyQueryGroup
            {
                Id = id,
                Datum = set
            }.Send();
        }
    }
}
